home *** CD-ROM | disk | FTP | other *** search
/ WWW Studio 2004 / WWW Studio.iso / Programy / Demo / angielskidemo_setup.exe / #setuppath# / 2.dxr / 00002_menu.ls < prev    next >
Encoding:
Text File  |  2004-02-01  |  7.0 KB  |  317 lines

  1. global menu_Pactions, gv_currenthelp, gv_Pactions, gv_tlumaczenie, gtlo
  2.  
  3. on menu_begin
  4.   dialog_exit(#init)
  5.   dialog_punktacja(#init)
  6.   gf_pactions_clear()
  7.   gf_pactions_add(5, 24)
  8.   gf_pactions_add(40)
  9.   gf_pactions_add(96)
  10.   gf_pactions_add(61, 70)
  11. end
  12.  
  13. on menu_end
  14. end
  15.  
  16. on menu_firstenter
  17.   SetVisibility(0, 120)
  18.   if not gf_checkglobalfirstenter() then
  19.     gf_setglobalfirstenter()
  20.     mis_help("2_01.wav")
  21.   else
  22.     mis_help("10_01.WAV")
  23.   end if
  24. end
  25.  
  26. on menu_ef
  27.   sequenceaction()
  28.   gf_tlo()
  29.   randomactions()
  30. end
  31.  
  32. on menu_Pspr spnr
  33.   case spnr of
  34.     5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 96:
  35.       gfang_Psound(spnr)
  36.       gfang_PFX(spnr)
  37.     40, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70:
  38.       gfang_Panim(spnr)
  39.     31:
  40.       Paction_sound("2_04p.wav")
  41.     32:
  42.       if gtlo then
  43.         Paction_sound("2_27p.wav")
  44.       else
  45.         Paction_sound("2_2702P.WAV")
  46.       end if
  47.       FX("2_2701p.wav")
  48.     33:
  49.       Paction_sound("2_06p.wav")
  50.     34:
  51.       Paction_sound("2_07p.wav")
  52.       FX("2_0701p.wav")
  53.     35:
  54.       Paction_sound("2_05p.wav")
  55.     36:
  56.       if gv_tlumaczenie then
  57.         Paction_sound("10_1003w.wav")
  58.       else
  59.         Paction_sound("10_03p.wav")
  60.       end if
  61.     90:
  62.       setfromcoords(30, 92)
  63.       sequenceaction_clear(#Paction)
  64.       sequenceaction_addsound("2_01p.wav", #Paction)
  65.       sequenceaction_addaction("mis_compl()", VOID, #Paction)
  66.   end case
  67. end
  68.  
  69. on mis_compl
  70.   sequenceaction_clear(#Paction)
  71.   puppetSoundOFF()
  72.   disposeBMPsprite(92)
  73. end
  74.  
  75. on menu_PFspr spnr
  76.   case spnr of
  77.     5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 96:
  78.       gf_config(#p, spnr)
  79.     31, 32, 33, 34, 35, 36:
  80.       setfromcoords(spnr - 20, spnr, "bmpcoords_global")
  81.   end case
  82. end
  83.  
  84. on menu_Dspr spnr
  85.   case spnr of
  86.     31, 32, 33, 34, 35, 36:
  87.       setfromcoords(spnr - 10, spnr, "bmpcoords_global")
  88.   end case
  89. end
  90.  
  91. on menu_Lspr spnr
  92.   case spnr of
  93.     5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 96:
  94.       gf_config(#s, spnr)
  95.       Laction()
  96.       puppetFXOFF()
  97.     40, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70:
  98.       Laction_seq()
  99.     31, 32, 33, 34, 35, 36:
  100.       setfromcoords(spnr - 30, spnr, "bmpcoords_global")
  101.       Laction()
  102.       puppetFXOFF()
  103.     90:
  104.       if sequenceaction_isactive(#Paction) then
  105.         mis_compl()
  106.       end if
  107.   end case
  108. end
  109.  
  110. on menu_Wspr spnr
  111.   menu_Lspr(spnr)
  112.   case spnr of
  113.     5:
  114.       gf_actiongomovie("4.dir")
  115.     65:
  116.       gf_actiongomovie("3.dir")
  117.     31:
  118.       gf_actiongomovie("5.dir")
  119.     32:
  120.       gtlo = 1 - gtlo
  121.       if not gtlo then
  122.         puppetTloOFF()
  123.       else
  124.         gf_tlo()
  125.       end if
  126.     33:
  127.       if gfang_checknagroda(#sklep) and gfang_checknagroda(#domek1) and gfang_checknagroda(#domek2) and gfang_checknagroda(#kolor) then
  128.         gf_actiongomovie("7.dir")
  129.       else
  130.         dialog_punktacja(#show)
  131.       end if
  132.     34:
  133.       dialog_exit(#show, "9_0302.WAV")
  134.     139:
  135.       savescore()
  136.       gf_actiongo("exit", #out)
  137.     35:
  138.       gf_actiongomovie("6.dir")
  139.     36:
  140.       gv_tlumaczenie = 1 - gv_tlumaczenie
  141.     90:
  142.       mis_help("2_0101w.wav")
  143.   end case
  144. end
  145.  
  146. on mis_help WAV
  147.   randomactions_freeze()
  148.   setfromcoords(30, 92)
  149.   gf_setconfirm("mis_helpcompl()")
  150.   sequenceaction_clear(#help)
  151.   sequenceaction_addsound(WAV, #help)
  152.   sequenceaction_addaction("gf_doconfirm()", VOID, #help)
  153. end
  154.  
  155. on mis_helpcompl
  156.   sequenceaction_clear(#help)
  157.   puppetSoundOFF()
  158.   puppetFXOFF()
  159.   gf_clearconfirm(1)
  160.   setfromcoords(31, 91)
  161.   disposeBMPsprite(92)
  162.   gf_config(#s, 61)
  163.   gf_config(#s, 62)
  164.   gf_config(#s, 66)
  165.   show(92)
  166.   randomactions_allow()
  167. end
  168.  
  169. on menu_cue a, b, c
  170.   case c of
  171.     "2_01_02":
  172.       hide(92)
  173.       cueaction(66)
  174.     "2_01_02e":
  175.       show(92)
  176.       gf_config(#s, 66)
  177.     "2_01_03":
  178.       hide(92)
  179.       cueaction(62)
  180.     "2_01_03e":
  181.       show(92)
  182.       gf_config(#s, 62)
  183.     "2_01_04":
  184.       hide(92)
  185.       cueaction(61)
  186.     "2_01_04e":
  187.       show(92)
  188.       gf_config(#s, 61)
  189.     "2_01_01", "2_01_05", "2_01_06":
  190.       setfromcoords(31, 91)
  191.       updateStage()
  192.       setfromcoords(32, 91)
  193.       updateStage()
  194.   end case
  195. end
  196.  
  197. on cueaction spnr
  198.   global gv_pactiondvspnr, gv_pactionactive
  199.   p = getaProp(gv_Pactions, spnr)
  200.   if voidp(p) then
  201.     exit
  202.   end if
  203.   if not gv_tlumaczenie then
  204.     FX = getaProp(p, #Fx1)
  205.   else
  206.     FX = getaProp(p, #Fx2)
  207.   end if
  208.   sequenceaction_clear(#cueanim)
  209.   sequenceaction_addaction("gf_config(#P," & spnr & ")", VOID, #cueanim)
  210.   sequenceaction_addsound(FX, #cueanim, 3)
  211.   sequenceaction_addaction("gf_config(#S," & spnr & ")", VOID, #cueanim)
  212. end
  213.  
  214. on dialog_punktacja func, nr
  215.   global gv_results
  216.   case func of
  217.     #init:
  218.       hide(105, 116)
  219.     #show:
  220.       randomactions_freeze()
  221.       dialog_punktacja(#mis)
  222.       updateStage()
  223.       L = [#sklep, #domek1, #domek2, #kolor]
  224.       puppetTrans(#dissolve)
  225.       repeat with i = 1 to 4
  226.         sprite(106 + i).visible = gfang_checknagroda(getAt(L, i))
  227.       end repeat
  228.       show([105, 106, 111, 112, 113, 114, 115, 116])
  229.       updateStage()
  230.     #hide:
  231.       randomactions_allow()
  232.       dialog_punktacja(#misclear)
  233.       updateStage()
  234.       puppetTrans(#dissolve)
  235.       hide(105, 116)
  236.       updateStage()
  237.     #mis:
  238.       sequenceaction_clear(#punktacja)
  239.       sequenceaction_addaction("setfromcoords(30,92)", VOID, #punktacja)
  240.       sequenceaction_addsound("2_0103.WAV", #punktacja, 2)
  241.       sequenceaction_addaction("disposebmpsprite(92)", VOID, #punktacja)
  242.     #misclear:
  243.       sequenceaction_clear(#punktacja)
  244.       disposeBMPsprite(92)
  245.       psound(0, 2)
  246.     #p:
  247.       if not sequenceaction_isactive(#punktacja) then
  248.         case nr of
  249.           1:
  250.             Paction_sound("8_05P.WAV")
  251.           2:
  252.             setfromcoords(30, 92)
  253.             sequenceaction_clear(#Paction)
  254.             sequenceaction_addsound("2_01p.wav", #Paction)
  255.             sequenceaction_addaction("mis_compl()", VOID, #Paction)
  256.           3:
  257.             Paction_sound("8_02P.WAV")
  258.           4:
  259.             Paction_sound("8_03P.WAV")
  260.           5:
  261.             Paction_sound("8_04P.WAV")
  262.           6:
  263.             Paction_sound("8_06P.WAV")
  264.         end case
  265.       end if
  266.     #L:
  267.       case nr of
  268.         1, 3, 4, 5, 6:
  269.           Laction()
  270.         2:
  271.           if sequenceaction_isactive(#Paction) then
  272.             mis_compl()
  273.           end if
  274.       end case
  275.     #W:
  276.       case nr of
  277.         1:
  278.           gv_results = []
  279.           hide(107, 110)
  280.           updateStage()
  281.         2:
  282.           if sequenceaction_isactive(#Paction) then
  283.             mis_compl()
  284.           end if
  285.           if sequenceaction_isactive(#punktacja) then
  286.             dialog_punktacja(#misclear)
  287.           else
  288.             dialog_punktacja(#mis)
  289.           end if
  290.         6:
  291.           dialog_punktacja(#hide)
  292.       end case
  293.   end case
  294. end
  295.  
  296. on shape f, nr
  297.   case f of
  298.     #p:
  299.       case nr of
  300.         1, 2:
  301.           Paction_sound(gfang_tlumaczenie("2_26"))
  302.           FX("2_2601pp.wav")
  303.         3, 4:
  304.           Paction_sound(gfang_tlumaczenie("2_14"))
  305.           FX("2_1401p.wav")
  306.         5, 6:
  307.           Paction_sound(gfang_tlumaczenie("2_33"))
  308.       end case
  309.     #L:
  310.       case nr of
  311.         1, 2, 3, 4, 5, 6:
  312.           Laction()
  313.           puppetFXOFF()
  314.       end case
  315.   end case
  316. end
  317.